local sk__shangdao = fk.CreateSkill {

  name = "sk__shangdao",

  tags = { Skill.Compulsory, },

}



sk__shangdao:addEffect(fk.EventPhaseStart, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(sk__shangdao.name) and target.phase == Player.Start and target:getHandcardNum() >= player:getHandcardNum()
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local card = room:getNCards(1)
    room:moveCardTo(card, Card.Processing, nil, fk.ReasonJustMove, sk__shangdao.name, nil, true, player)
    room:delay(800)
    room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonJustMove, sk__shangdao.name, nil, true, player)
  end,
})

return sk__shangdao